Skip to content

Fix 'path ... does not exist' false-positive for expr containing DIRECTORY_SEPARATOR - #6035

Merged
staabm merged 1 commit into
phpstan:2.2.xfrom
staabm:dir-sep
Jul 11, 2026
Merged

Fix 'path ... does not exist' false-positive for expr containing DIRECTORY_SEPARATOR#6035
staabm merged 1 commit into
phpstan:2.2.xfrom
staabm:dir-sep

Conversation

@staabm

@staabm staabm commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

root problem was that DIRECTORY_SEPARATOR was resolved into '\\'|’/' which made it duplicate errors when paths later on where build with both variants. this also lead to the 'crazy' result of seeing windows-style path separators in errors on linux based systems and vice-versa.

closes phpstan/phpstan#14944
closes #6027

@staabm
staabm requested a review from VincentLanglet July 11, 2026 07:19
@staabm
staabm marked this pull request as ready for review July 11, 2026 07:23
@phpstan-bot

Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

@staabm
staabm merged commit 60fa8e3 into phpstan:2.2.x Jul 11, 2026
674 checks passed
@staabm
staabm deleted the dir-sep branch July 11, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require test fails on linux when path contains DIRECTORY_SEPARATOR

3 participants